<template>
  <div>this is app root</div>
  <button @click="showMessage1">成功</button>
  <button @click="showMessage2">失败</button>
</template>

<script>
import Message from '@/components/message'

export default {
  name: 'App',
  setup(props, ctx) {
    const showMessage1 = () => {
      Message({
        msg: '红红火火恍恍惚惚',
        type: 'success'
      })
    }
    const showMessage2 = () => {
      Message.error('红红火火恍恍惚惚')
    }

    return {
      showMessage1,
      showMessage2
    }
  }
}
</script>
